//
//  M4UINavigationController.swift
//  M4
//
//  Created by YuChuang on 2024/8/6.
//

import UIKit

class M4UINavigationController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        if self.children.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        super.pushViewController(viewController, animated: animated)
    }
    
    override var childForStatusBarHidden: UIViewController? {
        return visibleViewController
    }
    override var childForStatusBarStyle: UIViewController? {
      return visibleViewController
    }

}
